<?php
/* $txt = '{"order":"<?xml version=\"1.0\" encoding=\"utf-8\" ?><request><header><signed>d84f39757644ceb9d5aae85f8ae872ce<\/signed><\/header><body><order><orderId>25283767<\/orderId><status>CANCEL<\/status><approveStatus>true<\/approveStatus><paymentStatus>PAYED<\/paymentStatus><waitPaymentTime><\/waitPaymentTime><credenctStatus>CREDENCE_SEND<\/credenctStatus><performStatus>UNUSE<\/performStatus><credentials><credential><goodsId>948879<\/goodsId><serialCode>2015102853331441<\/serialCode><QRcode>null<\/QRcode><additional>null<\/additional><\/credential><\/credentials><\/order><\/body><\/request>"}';
$a = json_decode($txt,true);
print_r($a['order']);exit; */

$s = <<<xml
<?xml version="1.0" encoding="utf-8" ?><request><header><signed>d84f39757644ceb9d5aae85f8ae872ce</signed></header><body><order><orderId>25283767</orderId><status>CANCEL</status><approveStatus>true</approveStatus><paymentStatus>PAYED</paymentStatus><waitPaymentTime></waitPaymentTime><credenctStatus>CREDENCE_SEND</credenctStatus><performStatus>UNUSE</performStatus><credentials><credential><goodsId>948879</goodsId><serialCode>2015102853331441</serialCode><QRcode>null</QRcode><additional>null</additional></credential></credentials></order></body></request>
xml;
$orderxml = simplexml_load_string($s);
// print_r($orderxml);exit;
$additional = (string)$orderxml->body->order->credentials->credential->additional;
echo $additional;
if($additional != 'null') echo 111;
else echo 22;
?>